<template>
    <section class="item-left">
        <div class="time-left">
            <span>{{ mytime }}</span>
        </div>
        <img :src="avatar" alt="" class="avatar-left">
        <span v-if="msg">
            {{ msg }}
        </span>
    </section>
</template>

<script>
//import dateFormat from '../utils/date'
export default{
      name: 'otherMsg',
  props: ['msg', 'mytime', 'avatar'],
  computed: {
    // getdate () {
    //   return dateFormat(new Date(this.mytime), 'yyyy-MM-dd HH:mm:ss')
    // }
  },
   mounted(){

   },
}
</script>

<style lang="scss" scoped>
    @import 'src/style/mixin';
.item-left {
    display: block;
        background-color: white;
        height: 3em;
        width: 100%;
        animation: show-chat-odd 0.25s 1 ease-in;
        -moz-animation: show-chat-odd 0.25s 1 ease-in;
        -webkit-animation: show-chat-odd 0.25s 1 ease-in;
        float: right;
}
.item-left::after {
    position: absolute;
    top: 15px;
    content: '';
    width: 0;
    height: 0;
    border-top: 15px solid rgba(25, 147, 147, 0.2);
    border-left: 15px solid transparent;
    left: -15px;
}
.img-left {
    max-width: 200px;
}
.time-left {
   @include font(0.5em, 0.5rem, 'PingFangSC-Regular');
        width: 29em;
        height: 1em;
        left: -5.9em;
        text-align: left;
        overflow: hidden;
        position: absolute;
        -ms-text-overflow: ellipsis;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: lighter;
}
span {
    word-break: break-all;
}

.avatar-left {
        width: 1.6em;
        height: 1.6em;
        border-radius: 0.1em;
        /* right: 0.5em; */
        margin-left: 0.2em;
        margin-top: 0.7em;
        float: right;
}
</style>
